/* 工业生产预测项目技术文档 - 企业级现代风格 */
:root {
    --primary-color: #0052cc;
    --secondary-color: #00875a;
    --text-color: #172b4d;
    --text-light: #5e6c84;
    --background-color: #f4f5f7;
    --card-background: #ffffff;
    --border-color: #dfe1e6;
    --shadow-color: rgba(9, 30, 66, 0.08);
    --success-color: #36b37e;
    --warning-color: #ffab00;
    --danger-color: #ff5630;
    --info-color: #00b8d9;
    --code-background: #f4f5f7;
    --code-text: #172b4d;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    --font-code: 'SFMono-Medium', 'SF Mono', 'Segoe UI Mono', 'Roboto Mono', 'Ubuntu Mono', Menlo, Consolas, Courier, monospace;
    --transition-speed: 0.2s;
}

/* 全局样式重置 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    background-color: var(--background-color);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    color: #2c3e50;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    font-weight: 600;
    letter-spacing: -0.02em;
}

h1 {
    text-align: center;
    border-bottom: none;
    padding-bottom: 20px;
    margin-bottom: 40px;
    font-size: 2.5em;
    background: linear-gradient(120deg, #1a5276, #2980b9);
    color: white;
    padding: 30px 20px;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 4px 15px rgba(41, 128, 185, 0.2);
    position: relative;
}

h1::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 0 0 8px 8px;
}

h2 {
    border-left: 4px solid #3498db;
    padding-left: 15px;
    margin-top: 50px;
    font-size: 1.9em;
    background-color: #f8fafc;
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

h2:hover {
    background-color: #f1f7fc;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

h3 {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    font-size: 1.5em;
    color: #2980b9;
    position: relative;
}

h3::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: #3498db;
}

h4 {
    font-size: 1.25em;
    color: #3498db;
    margin-top: 30px;
    position: relative;
    padding-left: 15px;
}

h4::before {
    content: "■";
    position: absolute;
    left: 0;
    color: #3498db;
    font-size: 0.8em;
    top: 0.1em;
}

.container {
    background-color: white;
    padding: 0;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 50px;
    overflow: hidden;
}

.container > *:not(h1) {
    padding: 0 40px;
}

.container > *:last-child {
    padding-bottom: 40px;
}

.highlight {
    background: linear-gradient(to right, #f1f9ff, #e5f7ff);
    border-left: 4px solid #3498db;
    padding: 25px;
    margin: 30px 0;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: relative;
}

.highlight::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%233498db" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>') no-repeat;
    background-position: 15px 15px;
    opacity: 0.2;
}

img {
    max-width: 100%;
    display: block;
    margin: 35px auto;
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

table, th, td {
    border: none;
}

th, td {
    padding: 15px 20px;
    text-align: left;
}

th {
    background: linear-gradient(to right, #2c3e50, #3498db);
    color: white;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.9em;
}

tr {
    border-bottom: 1px solid #e9ecef;
}

tr:last-child {
    border-bottom: none;
}

tr:nth-child(even) {
    background-color: #f8fafc;
}

tr:hover {
    background-color: #f1f7fc;
}

.workflow {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin: 40px 0;
    gap: 25px;
}

.step {
    flex: 0 0 calc(45% - 25px);
    background: linear-gradient(to bottom right, #ffffff, #f8fafc);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.step::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, #3498db, #2ecc71);
    border-radius: 4px 0 0 4px;
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.step h3 {
    margin-top: 0;
    color: #2980b9;
    border-bottom: 1px solid rgba(52, 152, 219, 0.3);
    padding-bottom: 12px;
    font-size: 1.3em;
}

.step h3::after {
    display: none;
}

.conclusion {
    background: linear-gradient(to right, #e8f8f5, #d1f2eb);
    padding: 30px;
    border-radius: 10px;
    border-left: 5px solid #2ecc71;
    margin: 40px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
}

.conclusion::before {
    content: "✓";
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2em;
    color: rgba(46, 204, 113, 0.2);
}

.chart {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 30px;
    margin: 35px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.chart:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

/* 代码块样式 */
.code-block {
    background-color: #282c34;
    border: none;
    border-radius: 10px;
    padding: 0;
    margin: 30px 0;
    overflow: hidden;
    font-family: 'Fira Code', 'Consolas', 'Monaco', 'Courier New', monospace;
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.code-block pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
    line-height: 1.6;
    font-size: 14px;
    background-color: #282c34;
    color: #abb2bf;
    border-radius: 0 0 10px 10px;
}

.code-block code {
    font-family: 'Fira Code', 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* 代码语言标签 */
.code-block::before {
    content: "Code";
    display: block;
    background-color: #3e4451;
    color: #ffffff;
    padding: 8px 20px;
    font-size: 12px;
    font-weight: bold;
    border-bottom: 1px solid #4b5363;
    letter-spacing: 0.05em;
}

.code-block[data-language="python"]::before {
    content: "Python";
}

.code-block[data-language="sql"]::before {
    content: "SQL";
}

.code-block[data-language="json"]::before {
    content: "JSON";
}

.code-block[data-language="html"]::before {
    content: "HTML";
}

/* Python语法高亮 */
.code-keyword { color: #c678dd; }
.code-string { color: #98c379; }
.code-comment { color: #7f848e; font-style: italic; }
.code-number { color: #d19a66; }
.code-function { color: #61afef; }

/* 卡片布局 */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin: 30px 0;
}

.card {
    flex: 1 1 300px;
    background-color: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-top: 4px solid #3498db;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.card h4 {
    margin-top: 0;
    color: #2980b9;
    padding-left: 0;
}

.card h4::before {
    display: none;
}

.card-icon {
    font-size: 2.5em;
    color: #3498db;
    margin-bottom: 15px;
    text-align: center;
}

/* 可折叠内容 */
.collapsible {
    background-color: #f8fafc;
    color: #2c3e50;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.collapsible:hover {
    background-color: #e5f7ff;
}

.collapsible::after {
    content: "+";
    font-size: 18px;
    font-weight: bold;
    float: right;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.active::after {
    content: "-";
}

.collapsible-content {
    padding: 0 18px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: white;
    border-radius: 0 0 8px 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0;
    }
    
    .container > *:not(h1) {
        padding: 0 20px;
    }
    
    .workflow {
        flex-direction: column;
    }
    
    .step {
        flex: 0 0 100%;
    }
    
    .card-container {
        flex-direction: column;
    }
    
    table {
        font-size: 14px;
        display: block;
        overflow-x: auto;
    }

    h1 {
        font-size: 1.8em;
        padding: 20px 15px;
    }

    h2 {
        font-size: 1.5em;
    }

    h3 {
        font-size: 1.3em;
    }
}

/* 打印样式 */
@media print {
    body {
        background-color: white;
        padding: 0;
        font-size: 12pt;
    }
    
    .container {
        box-shadow: none;
        padding: 0;
    }
    
    .chart img {
        max-width: 80%;
        box-shadow: none;
    }

    a {
        text-decoration: none;
        color: #333;
    }

    h2 {
        page-break-before: always;
    }

    .code-block {
        page-break-inside: avoid;
        border: 1px solid #ddd;
        box-shadow: none;
    }
    
    .step {
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .card {
        box-shadow: none;
        page-break-inside: avoid;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 导航样式 */
.nav {
    position: sticky;
    top: 0;
    background-color: white;
    padding: 15px 40px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 30px;
    z-index: 100;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-weight: bold;
    font-size: 1.2em;
    color: #2980b9;
}

.nav ul {
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0;
    justify-content: center;
    flex-wrap: wrap;
}

.nav li {
    margin: 5px 10px;
}

.nav a {
    text-decoration: none;
    color: #3498db;
    font-weight: bold;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s;
    display: inline-block;
}

.nav a:hover {
    background-color: #f0f7fd;
    transform: translateY(-2px);
}

.nav a.active {
    background-color: #3498db;
    color: white;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
    opacity: 1;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* 进度指示器 */
.progress-container {
    position: fixed;
    top: 0;
    width: 100%;
    height: 5px;
    background: transparent;
    z-index: 101;
}

.progress-bar {
    height: 5px;
    background: linear-gradient(to right, #3498db, #2ecc71);
    width: 0%;
}

/* 新增: 数据可视化区域 */
.visualization {
    margin: 30px 0;
    padding: 20px;
    border-radius: 8px;
    background-color: #f8fafc;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.visualization:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.visualization-title {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
    position: relative;
}

.visualization-title:after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, #3498db, #2ecc71);
    border-radius: 3px;
}

/* 新增: 特征图表样式 */
.feature-impact {
    margin: 20px 0;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.feature-name {
    width: 40%;
    font-size: 0.9rem;
    color: #2c3e50;
    padding-right: 15px;
}

.feature-bar-container {
    width: 50%;
    height: 15px;
    background-color: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
}

.feature-bar {
    height: 100%;
    background: linear-gradient(to right, #3498db, #9b59b6);
    border-radius: 10px;
}

.feature-value {
    width: 10%;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    text-align: right;
    padding-left: 15px;
}

/* 新增: 阶段进度样式 */
.stage-progress {
    display: flex;
    justify-content: space-between;
    margin: 40px 0;
    position: relative;
}

.stage-progress:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #e0e0e0;
    transform: translateY(-50%);
    z-index: 1;
}

.stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.stage-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.stage.completed .stage-dot {
    background-color: #2ecc71;
}

.stage.active .stage-dot {
    background-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.3);
}

.stage-name {
    font-size: 0.9rem;
    color: #7f8c8d;
    text-align: center;
}

.stage.completed .stage-name, 
.stage.active .stage-name {
    color: #2c3e50;
    font-weight: 600;
}

/* 新增: 统计卡片 */
.stats-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 20px 0;
    gap: 15px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 15px;
    flex: 1;
    min-width: 200px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.stat-label {
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-trend {
    font-size: 14px;
    color: #7f8c8d;
}

.trend-up {
    color: #2ecc71;
}

.trend-down {
    color: #e74c3c;
}

/* 特征影响力可视化 */
.feature-impact {
    margin: 20px 0;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.feature-name {
    width: 30%;
    min-width: 200px;
    font-weight: 500;
}

.feature-bar-container {
    flex: 1;
    height: 20px;
    background: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 15px;
}

.feature-bar {
    height: 100%;
    background: linear-gradient(to right, #3498db, #2ecc71);
    border-radius: 10px;
}

.feature-value {
    width: 60px;
    text-align: right;
    font-weight: 500;
    color: #2c3e50;
}

/* 视觉层次优化 */
.visualization {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 20px;
    margin: 20px 0;
}

.visualization-title {
    font-size: 18px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .stats-container {
        flex-direction: column;
    }
    
    .feature-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .feature-name {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .feature-bar-container {
        width: 100%;
        margin: 5px 0;
    }
    
    .feature-value {
        width: 100%;
        text-align: left;
    }
}

/* 项目收益卡片样式 */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.benefit-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.benefit-icon {
    font-size: 36px;
    margin-bottom: 15px;
}

.benefit-title {
    font-size: 18px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 10px;
}

.benefit-desc {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.5;
}

/* 处理步骤样式 */
.process-steps {
    margin: 30px 0;
}

.process-step {
    display: flex;
    margin-bottom: 30px;
    position: relative;
}

.process-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 25px;
    top: 50px;
    height: calc(100% - 20px);
    width: 2px;
    background: linear-gradient(to bottom, #3498db, #2ecc71);
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2ecc71);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 20px;
    flex-shrink: 0;
    margin-right: 20px;
    z-index: 1;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.step-content {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    flex-grow: 1;
}

.step-content h4 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 18px;
    border-left: none;
    padding-left: 0;
}

.step-content h4::before {
    display: none;
}

.step-stats {
    margin-top: 15px;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 14px;
    color: #7f8c8d;
    display: inline-block;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .process-step {
        flex-direction: column;
    }
    
    .step-number {
        margin-bottom: 15px;
    }
    
    .process-step:not(:last-child)::after {
        left: 25px;
        top: 50px;
        height: calc(100% - 50px);
    }
}

/* 修改侧边导航栏样式 */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background-color: #1e293b;
    color: #e2e8f0;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    padding-bottom: 50px;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #334155;
    background-color: #0f172a;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-title {
    opacity: 0;
    width: 0;
}

.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background-color: #334155;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.sidebar-toggle:hover {
    background-color: #475569;
}

.sidebar-toggle i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.sidebar-nav {
    padding: 16px 0;
}

.sidebar-nav-item {
    margin-bottom: 2px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: #e2e8f0;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin: 0 8px;
    position: relative;
}

.sidebar-nav-link:hover {
    background-color: #334155;
    color: #ffffff;
}

.sidebar-nav-link.active {
    background-color: #3b82f6;
    color: #ffffff;
    font-weight: 500;
}

.sidebar-nav-link i {
    margin-right: 12px;
    font-size: 16px;
    width: 20px;
    text-align: center;
    transition: margin 0.3s ease;
}

.sidebar.collapsed .sidebar-nav-link i {
    margin-right: 0;
}

.sidebar-nav-link span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-nav-link span {
    opacity: 0;
    width: 0;
}

.sidebar-nav-item.has-submenu > .sidebar-nav-link:after {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    margin-left: auto;
    transition: transform 0.3s ease;
}

.sidebar-nav-item.has-submenu.expanded > .sidebar-nav-link:after {
    transform: rotate(90deg);
}

.sidebar.collapsed .sidebar-nav-item.has-submenu > .sidebar-nav-link:after {
    opacity: 0;
}

.sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-left: 16px;
    margin-right: 8px;
}

.sidebar-submenu.expanded {
    max-height: 500px; /* 足够大的值以容纳子菜单 */
}

.sidebar-submenu-link {
    display: flex;
    align-items: center;
    padding: 8px 16px 8px 28px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    border-radius: 4px;
    position: relative;
}

.sidebar-submenu-link:before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #64748b;
    transform: translateY(-50%);
    transition: background-color 0.2s ease;
}

.sidebar-submenu-link:hover {
    background-color: #334155;
    color: #ffffff;
}

.sidebar-submenu-link:hover:before {
    background-color: #60a5fa;
}

.sidebar-submenu-link.active {
    background-color: #2563eb;
    color: #ffffff;
    font-weight: 500;
}

.sidebar-submenu-link.active:before {
    background-color: #ffffff;
}

.sidebar.collapsed .sidebar-submenu {
    display: none;
}

/* 移动端侧边栏样式 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.mobile-expanded {
        transform: translateX(0);
    }
    
    .sidebar.collapsed {
        transform: translateX(-100%);
    }
    
    .sidebar-toggle {
        display: none;
    }
    
    .mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 16px;
        left: 16px;
        width: 40px;
        height: 40px;
        background-color: #1e293b;
        color: #e2e8f0;
        border-radius: 4px;
        z-index: 999;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }
    
    .sidebar.mobile-expanded ~ .mobile-nav-toggle {
        left: 296px;
        background-color: transparent;
        box-shadow: none;
    }
}

/* 动效增强 */
.sidebar-nav-link {
    overflow: hidden;
}

.sidebar-nav-link:after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 100px;
    height: 100px;
    margin-top: -50px;
    margin-left: -50px;
    opacity: 0;
    transition: all 0.6s ease;
    transform: scale(0);
    pointer-events: none;
}

.sidebar-nav-link:active:after {
    transform: scale(3);
    opacity: 0.15;
    transition: 0s;
}

.sidebar-submenu-link {
    overflow: hidden;
}

.sidebar-submenu-link:after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 100px;
    height: 100px;
    margin-top: -50px;
    margin-left: -50px;
    opacity: 0;
    transition: all 0.6s ease;
    transform: scale(0);
    pointer-events: none;
}

.sidebar-submenu-link:active:after {
    transform: scale(3);
    opacity: 0.15;
    transition: 0s;
}

/* 增强子菜单交互效果 */
.sidebar-submenu {
    position: relative;
    padding-left: 12px;
}

.sidebar-submenu:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: linear-gradient(to bottom, transparent, #3b82f6, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-submenu.expanded:before {
    opacity: 0.7;
}

.sidebar-submenu-link {
    margin-left: 4px;
    margin-bottom: 4px;
    transform: translateX(0);
    transition: transform 0.3s ease, background-color 0.2s ease, color 0.2s ease;
}

.sidebar-submenu-link:hover {
    transform: translateX(4px);
}

.sidebar-submenu-link.active {
    transform: translateX(4px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 增加动态指示器 */
.sidebar-nav-link .indicator,
.sidebar-submenu-link .indicator {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: #3b82f6;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-nav-link.active .indicator,
.sidebar-submenu-link.active .indicator {
    opacity: 1;
}

/* 适应暗色和亮色主题 */
@media (prefers-color-scheme: light) {
    .sidebar {
        background-color: #f8fafc;
        color: #334155;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar-header {
        background-color: #f1f5f9;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .sidebar-toggle {
        background-color: #e2e8f0;
    }
    
    .sidebar-toggle:hover {
        background-color: #cbd5e1;
    }
    
    .sidebar-nav-link {
        color: #334155;
    }
    
    .sidebar-nav-link:hover {
        background-color: #e2e8f0;
        color: #0f172a;
    }
    
    .sidebar-submenu-link {
        color: #64748b;
    }
    
    .sidebar-submenu-link:before {
        background-color: #cbd5e1;
    }
    
    .sidebar-submenu-link:hover {
        background-color: #e2e8f0;
        color: #0f172a;
    }
    
    .sidebar-submenu-link:hover:before {
        background-color: #3b82f6;
    }
    
    .mobile-nav-toggle {
        background-color: #f8fafc;
        color: #334155;
    }
}

/* 主内容区域样式 */
.main-content {
    margin-left: 280px;
    padding: 20px;
    transition: margin 0.3s ease;
}

.main-content.expanded {
    margin-left: 60px;
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding-top: 60px;
    }
    
    .main-content.expanded {
        margin-left: 0;
    }
}

/* 数据流程图样式 */
.data-flow-description {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.process-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 15px;
    text-align: center;
}

.flow-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.flow-step-content {
    background-color: #f8fafc;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 15px;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.flow-step-content h4 {
    margin: 0 0 8px 0;
    color: #2980b9;
    font-size: 16px;
    padding-left: 0;
}

.flow-step-content h4::before {
    display: none;
}

.flow-step-content p {
    margin: 0;
    color: #4a5568;
    font-size: 14px;
}

.flow-arrow {
    font-size: 24px;
    color: #7f8c8d;
    margin: 5px 0;
}

@media (max-width: 768px) {
    .flow-step-content {
        padding: 10px;
    }
}

/* 预测精度可视化样式 */
.accuracy-description {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.accuracy-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.accuracy-metric {
    background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.metric-title {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.accuracy-distribution {
    margin-top: 25px;
}

.accuracy-distribution h4 {
    color: #2c3e50;
    font-size: 16px;
    margin-bottom: 15px;
    border-left: 3px solid #3498db;
    padding-left: 10px;
}

.accuracy-distribution table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.accuracy-distribution th {
    background: linear-gradient(to right, #2c3e50, #3498db);
    color: white;
    padding: 10px;
    text-align: left;
}

.accuracy-distribution td {
    padding: 8px 10px;
    border-bottom: 1px solid #e2e8f0;
}

.accuracy-distribution tr:nth-child(even) {
    background-color: #f8fafc;
}

.accuracy-distribution tr:hover {
    background-color: #e3f2fd;
}

@media (max-width: 768px) {
    .accuracy-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ROI分析样式 */
.roi-description {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.roi-summary table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.roi-summary th {
    background: linear-gradient(to right, #2c3e50, #3498db);
    color: white;
    padding: 10px;
    text-align: left;
}

.roi-summary td {
    padding: 8px 10px;
    border-bottom: 1px solid #e2e8f0;
}

.roi-summary tr:nth-child(even) {
    background-color: #f8fafc;
}

.roi-summary tr:hover {
    background-color: #e3f2fd;
}

.roi-metrics {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-top: 20px;
    gap: 15px;
}

.metric {
    background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    min-width: 200px;
    flex: 1;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.metric-name {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

/* 收率趋势分析样式 */
.trend-description {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.trend-comparison {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.trend-before, .trend-after {
    flex: 1;
    min-width: 250px;
    padding: 15px;
    border-radius: 8px;
}

.trend-before {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

.trend-after {
    background-color: #e3f2fd;
    border: 1px solid #bbdefb;
}

.trend-before h4, .trend-after h4 {
    color: #2c3e50;
    font-size: 16px;
    margin-top: 0;
    margin-bottom: 15px;
    padding-left: 0;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
}

.trend-before h4::before, .trend-after h4::before {
    display: none;
}

.trend-before ul, .trend-after ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.trend-before li, .trend-after li {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trend-change {
    font-size: 14px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 4px;
}

.trend-change.positive {
    color: #2ecc71;
}

.trend-change.negative {
    color: #e74c3c;
}

.trend-table {
    margin-top: 20px;
}

.trend-table table {
    width: 100%;
    border-collapse: collapse;
}

.trend-table th {
    background: linear-gradient(to right, #2c3e50, #3498db);
    color: white;
    padding: 10px;
    text-align: left;
}

.trend-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e2e8f0;
}

.trend-table tr:nth-child(even) {
    background-color: #f8fafc;
}

.trend-table tr:hover {
    background-color: #e3f2fd;
}

.trend-conclusion {
    margin-top: 20px;
    padding: 15px;
    background-color: #f1f7fc;
    border-left: 3px solid #3498db;
    border-radius: 0 8px 8px 0;
}

@media (max-width: 768px) {
    .roi-metrics, .trend-comparison {
        flex-direction: column;
    }
}

/* 模型比较表格样式 */
.model-comparison {
    margin: 20px 0;
}

.model-comparison table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.model-comparison th {
    background: linear-gradient(to right, #2c3e50, #3498db);
    color: white;
    padding: 12px 15px;
    text-align: center;
    font-weight: 600;
}

.model-comparison td {
    padding: 10px 15px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.model-comparison tr:last-child td {
    border-bottom: none;
}

.model-comparison tr:nth-child(even) {
    background-color: #f8fafc;
}

.model-comparison tr:hover {
    background-color: #e3f2fd;
}

.model-comparison .best-model {
    background-color: #e3f2fd;
    font-weight: 600;
}

.model-comparison .best-model td {
    border-left: 2px solid #3498db;
    border-right: 2px solid #3498db;
}

.model-comparison .best-model td:first-child {
    border-left: 2px solid #3498db;
}

.model-comparison .best-model td:last-child {
    border-right: 2px solid #3498db;
}

/* 学习曲线样式 */
.learning-curve {
    margin: 25px 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.curve-description {
    padding: 20px;
}

.curve-text h4 {
    color: #2c3e50;
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 15px;
    padding-left: 0;
}

.curve-text h4::before {
    display: none;
}

.curve-text p {
    color: #4a5568;
    margin-bottom: 20px;
    line-height: 1.6;
}

.curve-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.stat-item {
    flex: 1 1 200px;
    background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.stat-name {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}
